CLI command modes provide specific sets of CLI commands. When you log onto the switch, you are in User EXEC mode with limited commands. While in a higher mode, you can access most commands from lower modes, except if they conflict with commands of your current mode.
There are two categories of CLI commands: show commands and configuration commands. You can use show commands from multiple command modes with the same results; they show the same configuration information regardless of the command mode. Configuration command results, however, might be dependent on the command mode from which a configuration command is used. For example, an enable command used in Global Configuration mode will enable a feature globally, and the same command used from one of the interface command modes will enable a feature for a specific interface only.
The following figure illustrates the navigation paths for the various command modes:
Your user authorization credentials determine what commands are available to you in Privileged EXEC mode and all higher-level modes. See Managing the Switch for more information.
To navigate from higher-level modes to lower-level modes, use the following commands:
exit to navigate from a higher-level mode to a lower-level mode, down to Privileged EXEC mode
end to navigate from any command mode directly to Privileged EXEC mode
disable to navigate from Privileged EXEC mode to User EXEC mode
logout to terminate the CLI session from any command mode
The following table describes the various command modes, including the CLI command to access each mode, the command prompt that displays in each mode, and a description of the purpose of the mode.
Note
Some command modes are hardware dependent. If any of the following commands modes do not display on your hardware, they are not supported or applicable.
Command mode |
Command to access mode |
Prompt displayed in mode |
Description |
---|---|---|---|
User EXEC |
None required; default mode |
> |
View configuration settings and connection status. |
Privileged EXEC |
enable |
# |
Configure limited device-wide settings. |
Note:
Depending on feature configuration, you can be prompted to enter a user name and password to access Privileged EXEC mode. For more information, see Authentication for Privileged EXEC Command Mode. |
|||
Global Configuration |
configure {terminal|network} |
(config)# |
From a terminal or TFTP server, configure device-wide global parameters on a running configuration, or specify the file name of a configuration file. |
GigabitEthernet Interface Configuration |
interface GigabitEthernet {slot/port[/sub-port][-slot/port[/sub-port]][,...][slot/all][all]} |
(config-if)# |
Configure chassis operations and features on a physical port. |
MLT Interface Configuration |
interface mlt <1-512> |
(config-mlt)# |
Configure an MLT interface. |
mgmtEthernet Interface Configuration |
interface mgmtEthernet mgmt |
(config-if)# |
Configure a dedicated physical management port. |
Loopback Interface Configuration |
interface loopback <1–256> |
(config-if)# |
Configure a loopback CLIP interface. |
VLAN Interface Configuration |
interface vlan <1–4059> |
(config-if)# |
Configure port-based, policy-based, private, or SPBM B-VLANs |
Logical Interface Configuration |
logical-intf isis <1–255> |
Layer 2: (config-isis-<1-255>)# Layer 3: (config-isis-<1-255>- <A.B.C.D>)# |
Configure a logical Layer 2 or Layer 3 IS-IS interface. |
BGP Router Configuration |
router bgp |
(router-bgp)# |
Configure device-wide BGP routing protocol settings. |
RIP Router Configuration |
router rip |
(config-rip)# |
Configure device-wide RIP routing protocol settings. |
OSPF Router Configuration |
router ospf |
(config-ospf)# |
Configure device-wide OSPF routing protocol settings. |
IS-IS Router Configuration |
router isis |
(config-isis)# |
Configure device-wide IS-IS routing protocol settings. |
IS-IS Router Remote Configuration |
router isis remote |
(config-isis-remote)# |
Configure the Multi-area SPB parameters like area virtual node, Shortest Path Bridging MAC (SPBM), manual area and so on. |
VRF Router Configuration |
router vrf WORD<1-16> |
(router-vrf)# |
Configure a VRF instance. |
VRRP Router Configuration |
router vrrp |
(config-vrrp)# |
Configure device-wide VRRP protocol settings. |
Application Configuration |
application |
(config-app)# |
Configure custom applications, such as RESTCONF. |
Management Instance Configuration |
mgmt <clip | oob | vlan> |
(mgmt:clip)# or (mgmt:oob)# or (mgmt:vlan)# |
Configure a segmented management CLIP, Out-of-Band (OOB), or VLAN instance. |
ELAN I-SID Configuration |
i-sid <1–16777215> [elan] |
(elan:<1-16777215>)# |
Add ports and traffic to a Switched UNI I-SID on a GigabitEthernet or MLT interface. |
ELAN-Transparent Configuration |
i-sid <1-16777215> elan-transparent |
(elan-tp:<1-16777215>)# |
Add ports and MLT interfaces to an ELAN-Transparent based service. |
OVSDB Configuration |
ovsdb |
(config-ovsdb)# |
Configure OVSDB protocol support for VXLAN Gateway. |
Route-Map Configuration |
route-map WORD<1-64> <1-65535> |
(route-map)# |
Configure device-wide or VRF instance-specific route map policy settings. |
DHCP-guard Configuration |
ipv6 fhs dhcp-guard policy WORD<1-64> |
(config-dhcpguard)# |
Configure DHCPv6 for advertised address-based, prefix-based, and preference-based filtering. |
DHCP Server Subnet Configuration |
ip dhcp-server subnet <A.B.C.D/X> |
(config-dhcp)# |
Configure a subnet for clients that request addresses from the hosted DHCP Server. |
RA-guard Configuration |
ipv6 fhs ra-guard policy WORD<1-64> |
(config-raguard)# |
Configure RA Guard for advertised IPv6 and MAC address-based, IPv6 prefix-based, preference-based, hop count limit-based, and default router preference-based filtering. |
VXLAN Configuration |
vnid <1–16777215> i-sid <1–16777215> |
(vxlan:<1-16777215>)# |
Associate port or MLT interface VLANs, configure VXLAN endpoints and untagged traffic. |
MKA Profile Configuration |
macsec mka profile WORD<1-16> |
(mka-profile)# |
Configure replay protection and confidentiality offset for an MKA profile. |
BFD Router Configuration |
router bfd |
(router-bfd)# |
Configure device-wide BFD settings. |